<template lang="html">
  <div id="special_list_con">
    <div class="banner_img" :style="{background:'url('+bg+') center no-repeat '}">
    </div>
    <div class="recommend_goods_list">
      <ul class="clearfix">
        <router-link tag="li" :to="item.url" :key='item.id' v-for="item in goods_list" class="fl">
          <div class="img_con">
            <img :src="item.img">
          </div>
          <div class="price_con clearfix pr">
            <div class="original_price redColor fl">￥{{item.price}}</div>
            <div class="discounted_price fr line_through" v-if="item.discount_price>item.price">专柜价：{{item.discount_price}}</div>
            <div class=" special_price pa" >{{item.special_price}}</div>
          </div>
          <div class="list_txt_con ells2">{{item.txt}}</div>
        </router-link>
      </ul>
    </div>
    <div class="goods_list_con">
      <div class="goods_list_container clearfix">
        <div class="fl in_goods_list_con in_goods_list_left">
          <ul class="">
            <router-link tag="li" :to="'/detail/'+item.id" :key="item.id"  v-for="item in goods_list_left_con">
              <div class="img_con">
                <img :src="item.img">
              </div>
              <div class="list_txt_con ells2">{{item.txt}}</div>
              <p class="list_num">
                <span>数量：{{item.num}}</span>
                <span>{{item.kind}}</span>
              </p>
              <div class="price_con clearfix pr">
                <div class="original_price redColor fl ">￥{{item.price}}</div>
                <div class="fr commend_con">
                  <span class="pr" v-if="item.commend_num >0"><i class="pa icon good_commend_icon" :class="{good_commend_icon_sel:item.is_commend}"></i>{{item.commend_num}}</span>
                  <span class="pr"  v-if="item.commend > 0 "><i class="pa icon commend_icon"></i>{{item.commend}}</span>
                </div>
              </div>
            </router-link>
          </ul>
        </div>
        <div class="fr in_goods_list_con in_goods_list_right">
          <ul class="">
            <router-link tag="li" :to="item.url" :key="item.id" v-for="item in goods_list_right_con" >
              <div class="img_con">
                <img :src="item.img">
              </div>
              <div class="list_txt_con ells2">{{item.txt}}</div>
              <p class="list_num">
                <span>数量：{{item.num}}</span>
                <span>{{item.kind}}</span>
              </p>
              <div class="price_con clearfix pr">
                <div class="original_price redColor fl">￥{{item.price}}</div>
                <div class="fr commend_con">
                  <span class="pr" v-if="item.commend_num >0"><i class="pa icon good_commend_icon"></i>{{item.commend_num}}</span>
                  <span class="pr"  v-if="item.commend > 0 "><i class="pa icon commend_icon"></i>{{item.commend}}</span>
                </div>
              </div>
            </router-link>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:["listcon"],
  data(){
    return{
      bg:'http://img12.360buyimg.com/cms/jfs/t4942/273/1335700723/67130/f6977c41/58ef55baN42dfc392.png!q80.webp',
      goods_list:[
        {
          id:2001,
          img:'http://zhengyi.date/plante/src/image/gameimg2.png',
          url:'https://www.douyu.com/directory/game/LOL',
          price:189,
          discount_price:200,
          txt:'力开力朗力开力朗（LOCAL902户外多功能登山包',
          special_price:''
        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg3.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'赠品',
          price:189,
          discount_price:200,
          txt:'力开力朗力开力朗（LOCAL902户外多功能登山包',
        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg4.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          price:189,
          discount_price:200,
          txt:'力开力朗力开力朗（LOCAL902户外多功能登山包',
        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg5.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          price:189,
          discount_price:200,
          txt:'力开力朗力开力朗（LOCAL902户外多功能登山包',
        }
      ],
      goods_list_left_con:[
        {
          id:2001,
          img:'http://zhengyi.date/plante/src/image/gameimg6.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'赠品',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302',
          is_commend:true
        },
        {
          id:2002,
          img:'http://zhengyi.date/plante/src/image/gameimg7.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302',
is_commend:true
        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg8.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302'

        }
      ],
      goods_list_right_con:[
        {
          img:'http://zhengyi.date/plante/src/image/gameimg9.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'赠品',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302'
        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg10.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302'

        },
        {
          img:'http://zhengyi.date/plante/src/image/gameimg11.png',
          url:'https://www.douyu.com/directory/game/LOL',
          special_price:'特价',
          txt:'这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试这是测试测试',
          num:'10盒',
          kind:'甜心系列',
          price:'56',
          commend_num:'256',
          commend:'302'

        }
      ]
    }
  }
}
</script>

<style lang="scss">
$redColor:#ba4e48;
$borderCol:#e7e7e7;
$greyCol:#9e9e9e;
$greyBg:#f0efea;
@mixin border-radius($px){
  border-radius: $px;
  -webkit-border-radius: $px;
}
@mixin box-sizing($box){
  box-sizing: $box;
}

#special_list_con{
  .banner_img{
    width: 100%;
    height: 4.3rem;
    padding: 0 0.15rem;
    background-size: cover !important;
    -webkit-background-size: cover;
    @include border-radius(6px);
  }
}
.recommend_goods_list{
  margin: 0.16rem 0;
  width: 100%;
  height: 3.5rem;
  padding: 0 0.15rem;
  overflow: hidden;
  ul{
    display: inline-block;
    width:20rem;
    li{
      margin-right: 0.16rem;
      width: 1.96rem;
      height: 3.5rem;
      background: #fff;
      border: 1px solid $borderCol;
      overflow: hidden;
      .img_con{
        width: 100%;
        height: 2.36rem;
        img{
          width: 100%;
          height: 100%;
        }
      }
      .price_con{
          margin:0.1rem 0;
          font-size: 0.16rem;
          width: 1.96rem;
          .original_price{
            width: 0.6rem;
            font-size: 0.28rem;
            font-weight: 700;
          }
          .discounted_price{
            font-size: 0.12rem;
            transform: scale(0.8);
            width: 1.36rem;
            color: $greyCol;
          }
          .special_price{
            padding: 0.04rem;
            color:#fff;
            text-align: center;
            background:$redColor;
            right: 0.1rem;top:0;
          }
      }
      .list_txt_con{font-size: 0.1rem; line-height: 0.28rem;color: $greyCol;width: 100%;padding: 0 0.04rem;}
    }
  }

}
.goods_list_con{

  padding: 0 0.15rem;
  background: $greyBg;
  .goods_list_container{
    margin-left: -0.15rem;
    .in_goods_list_con{
      width: 50%;
      padding-left: 0.15rem;
      background: $greyBg;
      @include box-sizing(border-box);
      ul{
        li{
          background: #fff;
          width: 100%;
          height: 4.36rem;
          margin: 0.15rem 0;
          @include border-radius(4px);
          border: 1px solid $borderCol;
          overflow: hidden;
          .img_con{
            width: 100%;
            height: 2.8rem;
            img{
              width: 100%;
              height: 100%;
            }
          }
          .list_num{
            padding: 0 0.15rem;
            color: #9e9e9e;
          }
          .list_txt_con {
            font-size: 0.14rem;
            line-height: 0.26rem;
            margin: 0.1rem 0;
            padding: 0 0.14rem;
          }
          .price_con{
            padding: 0 0.15rem;
            margin-top: 0.15rem;
            .original_price {
              font-size: 0.3rem;
            }
          }
          .commend_con{
            span{
              padding-left:  22px;
            }
          }
          &:nth-child(2n){
            height:4.76rem;

            .img_con{
              height:3.18rem;
            }
          }
        }

      }
      &.in_goods_list_right{
        ul{
            li{
              height: 4.76rem;
              .img_con{
                height:3.18rem;
              }
              &:nth-child(2n){
                height:4.36rem;
                .img_con{
                  height:2.8rem;
                }
              }
            }
        }

      }
    }
  }

}
</style>
